<template>
    <div class="bg-box">
            <form action="##" class="enter">
                <h2>登  录</h2>
                <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
                    <el-form-item label="用户名" class="item-form">
                        <el-input class="userLogin"placeholder="请输入用户名" v-model="formLabelAlign.username"></el-input>
                    </el-form-item>
                    <el-form-item label="密  码" class="item-form1">
                        <el-input class="userLogin" placeholder="请输入密码" v-model="formLabelAlign.password" show-password></el-input>
                    </el-form-item>
                </el-form>
                <button type="submit"  @click="dlu">登录</button>
            </form>
    </div>
</template>

<script>
    export default {
        name: "enter",
        data(){
            return {
                labelPosition: 'right',
                formLabelAlign: {
                    username: '',
                    password:''
                }
            }
        },
        methods:{
            dlu(){
                this.$message({
                    message: '登录成功',
                    type: 'success'
                });
                this.$router.push({path: '/storeView'})
            }
        }
    }
</script>

<style scoped>
    .bg-box{
        height: 710px;
        border: 1px solid white;
        background-image: url("../../assets/images/logo.png") ;
        background-repeat: no-repeat;
        background-size: 80% 100%;
        background-position-x: 160px;
        background-position-y: 120px;
        background-attachment: fixed;
        text-align: center;
    }
    .enter{
        height: 400px;
        width: 500px;
        background: rgba(0, 131, 208, 0.3);
        margin-top: 120px;
        margin-left: 250px;
        border-radius: 30px;
    }
    h2{
        padding: 50px;
    }
    .userLogin{
        width: 300px;
    }
    button{
        width: 280px;
        height: 40px;
        margin-top: 15px;
        border: none;
        background: #475669;
    }
</style>